package org.xxpay.service.dao.mapper;

import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.xxpay.core.entity.StatisticsPlat;
import org.xxpay.core.entity.StatisticsPlatExample;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface StatisticsPlatMapper {
    long countByExample(StatisticsPlatExample example);

    int deleteByExample(StatisticsPlatExample example);

    int deleteByPrimaryKey(Date statisticsDate);

    int insert(StatisticsPlat record);

    int insertSelective(StatisticsPlat record);

    List<StatisticsPlat> selectByExample(StatisticsPlatExample example);

    StatisticsPlat selectByPrimaryKey(Date statisticsDate);

    int updateByExampleSelective(@Param("record") StatisticsPlat record, @Param("example") StatisticsPlatExample example);

    int updateByExample(@Param("record") StatisticsPlat record, @Param("example") StatisticsPlatExample example);

    int updateByPrimaryKeySelective(StatisticsPlat record);

    int updateByPrimaryKey(StatisticsPlat record);

    /**
     * 平台数据汇总
     * @return
     */
    Map countAll();

    int updateStatistics(StatisticsPlat updateRecord);

    JSONObject payCorrect(Map param);

    JSONObject agentpayCorrect(Map param);

    JSONObject rechargeCorrectSuccess(Map param);
}
